package com.itzhigui.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 购物车实体类
 *
 * @author java1412
 * @since 2023-11-14 17:16:41
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@ApiModel(value = "购物车实体类")
public class Cart implements Serializable {
    @ApiModelProperty("编号")
    private Integer id;
    @ApiModelProperty("用户编号")
    private Integer userId;
    @ApiModelProperty("商品编号")
    private Integer productId;
    @ApiModelProperty("数量")
    private Integer quantity; // 数量
    @ApiModelProperty("是否选中")
    private Integer checked;// 是否选择,1=已勾选,0=未勾选
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime; // 创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime; // 更新时间
}
